<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="login.title"/></title>
    <meta name="heading" content="<fmt:message key='login.heading'/>"/>
    <meta name="menu" content="Login"/>
    <link rel="stylesheet" type="text/css" media="all" href="<c:url value='/styles/${appConfig["csstheme"]}/layout-1col.css'/>" />
</head>

<body id="login">

<c:if test="${param.error != null}">
    <div class="error" id="errorMessages" style="color:#FFFFFF; background-color:#C0C0C0;">
        <fmt:message key="errors.password.mismatch"/>
        <%--${sessionScope.SPRING_SECURITY_LAST_EXCEPTION.message}--%>
    </div>
</c:if>

<%-- Left Panel --%>
<div style="float: left">
<form method="post" id="loginForm" action="<c:url value='/j_security_check'/>"
    onsubmit="saveUsername(this);return validateForm(this)">
<fieldset style="padding-bottom: 0; padding: 0px; margin:0px; border:0px;float: left;">
<ul>
    <li>
		<table cellpadding="0" cellspacing="0" border="0" style="border:0px;"><tr><td align="left" width="130" nowrap="nowrap">
		<label for="j_username" class="required desc">
            <fmt:message key="label.username"/> <span class="req">*</span>
        </label></td>
        <td align="left" height="40"> <input type="text" class="text medium" name="j_username" id="j_username" tabindex="1" /></td>
        </tr>
		
		<tr><td align="left" width="130" nowrap="nowrap">
        <label for="j_password" class="required desc">
            <fmt:message key="label.password"/> <span class="req">*</span>
        </label>
		</td>
        <td align="left" height="40"><input type="password" class="text medium" name="j_password" id="j_password" tabindex="2" style="background-color: rgb(255, 255, 221);"></td></tr>
		
		
		<c:if test="${appConfig['rememberMeEnabled']}">
 		<tr><td align="left" width="122" height="40">&nbsp;
        </td>
        <td align="left">
        <input type="checkbox" class="checkbox" name="_spring_security_remember_me" id="rememberMe" tabindex="3" style="padding: 0px; margin:0px; border:0px;">
        <label for="rememberMe" class="choice" style="font-size:14px; color:#666;"><fmt:message key="login.rememberMe"/></label></td></tr>
		</c:if>
		
		<tr><td align="left" width="122" height="30">&nbsp;
			</td>
        <td align="left"><input type="submit" class="button" name="login" value="<fmt:message key='button.login'/>" tabindex="4"></td></tr>		</table>
    </li>

</ul>
</fieldset>
</form>
</div>



<%-- Divider --%>
<div style="float: left; width: 100px; height:170px; text-align:center; padding-top:20px; ">
	<div style="border-left: 1px solid #ddd; height:150px; clear: both; position:relative;left:50px;"></div>
</div>


<%-- Right Panel --%>
<div style="padding-top:15px; float: left; width: 390px; height:170px; text-align:left; font-size: 14px; font-weight:normal;">
	
	<h2><fmt:message key="login.no.member"/></h2>
	<p><fmt:message key="login.signup">
        <fmt:param><c:url value="/signup"/></fmt:param>
    	</fmt:message></p>
	<!--p><a href="/signup.xhtml">Click here</a>to signup</p-->    

	<p>&nbsp;</p>
	<h2><fmt:message key="login.forgot.password"/></h2>
	<p><fmt:message key="login.password.reset">
	<fmt:param><c:url value="/signupPasswordReset"/></fmt:param>
	</fmt:message></p>
	<!--p><a href="/signupPasswordReset">Reset</a> your password</p-->
	
</div>


<%@ include file="/scripts/login.js"%>

</body>
